#include <iostream>

using namespace std;

int main()
{
    string s;
    int n,t;
    cin>>n>>t;
    cin>>s;
    while(t--)
    {
        string t = s;
        for(int i=1;i<n;i++)
        {
            if(s[i-1]==s[i])
                {t[i]='0';}
            else
                {t[i]='1';}
        }
        if(t==s){break;}
        s = t;
    }
    cout<<s<<endl;
    return 0;
}
